﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EmployeeInput.ascx.cs"
    Inherits="MvcApplication5.Views.Master.EmployeeInput" %>
<%@ Import Namespace="MvcApplication5.Models" %>
<script src="../../../Scripts/Master/Control/EmployeeInput.js" type="text/javascript"></script>
<script src="../../Scripts/DatePicker/WdatePicker.js" type="text/javascript"></script>
<div id="addEmployeeInputFrame" style="width: 550px; height: 300px; background-color: White;
    display: none;">
    <div id="ctlFrameA" style="width: 260px; height: 150px; float: left;">
        <ul>
            <li class="li_class">
                <label>
                    <span style="color: Red;">* </span>帐号:</label>
                <input type="text" id="employee_code" runat="server" style="width: 120px;" />
                <span id="codeMessage"></span></li>
            <li class="li_class">
                <label>
                    <span style="color: Red;">* </span>密码:</label>
                <input type="text" id="employee_password" runat="server" style="width: 120px;" />
            </li>
            <li class="li_class">
                <label>
                    <span style="color: Red;">* </span>职位:</label>
                <select id="position_id" runat="server">
                </select>
            </li>
        </ul>
    </div>
    <div id="ctlFrameB" style="width: 240px; height: 150px; float: right; margin-right: 50px;">
        <ul>
            <li class="li_class">
                <label>
                    <span style="color: Red;">*</span> 姓名:</label>
                <input type="text" id="employee_name" runat="server" style="width: 120px;" />
            </li>
            <li class="li_class">
                <label>
                    <span style="color: Red;">* </span>电话:</label>
                <input type="text" id="employee_phone" runat="server" style="width: 120px;" />
            </li>
            <li class="li_class">
                <label>
                    <span style="color: Red;">* </span>邮箱:</label>
                <input type="text" id="employee_email" runat="server" style="width: 120px;" />
            </li>
            <li class="li_class">
                <label>
                    <span style="color: Red;">* </span>生日:</label>
                <input class="Wdate" type="text" id="birth_date" runat="server" style="width: 120px;"
                    targetformat="yyyy-MM-dd" onclick="WdatePicker()">
            </li>
        </ul>
    </div>
    <div style="width: 550px; text-align: center; clear: both; padding-top: 100px;">
        <img src="../../Content/images/button/btn_save.png" id="btnSave" runat="server" style="cursor: pointer" />
        <img src="../../Content/images/button/btn_delete.png" id="btnDelete" runat="server"
            style="cursor: pointer" />
        <img src="../../Content/images/button/btn_clear.png" id="btnClear" runat="server"
            style="cursor: pointer" />
        <img src="~/Content/images/button/btn_close.png" id="btnClose" runat="server" style="cursor: pointer" />
    </div>
    <input type="hidden" id="employee_id" runat="server" />
</div>
<script type="text/javascript">
        var employeeInputIns = null;
    function EmployeeInput_<%= this.ClientID %>_Page_Load(){

        <%= GetJSInstance()%> = new EmployeeInput();

        employeeInputIns = <%= GetJSInstance()%>;

        employeeInputIns.dom.clientID           = "<%= this.ClientID %>";
        employeeInputIns.dom.employee_id        = "<%= employee_id.ClientID %>";
        employeeInputIns.dom.employee_code      = "<%= employee_code.ClientID %>";
        employeeInputIns.dom.employee_password  = "<%= employee_password.ClientID %>";
        employeeInputIns.dom.position_id        = "<%= position_id.ClientID %>";
        employeeInputIns.dom.employee_name      = "<%= employee_name.ClientID %>";
        employeeInputIns.dom.employee_phone     = "<%= employee_phone.ClientID %>";
        employeeInputIns.dom.employee_email     = "<%= employee_email.ClientID %>";
        employeeInputIns.dom.birth_date         = "<%= birth_date.ClientID %>";

        employeeInputIns.dom.btnSave            = "<%= btnSave.ClientID %>";
        employeeInputIns.dom.btnDelete          = "<%= btnDelete.ClientID %>";
        employeeInputIns.dom.btnClear           = "<%= btnClear.ClientID %>";
        employeeInputIns.dom.btnClose           = "<%= btnClose.ClientID %>";

        employeeInputIns.init();
   }

    EmployeeInput_<%= this.ClientID %>_Page_Load();
</script>
